<!DOCTYPE html>
<html>


<!-- Mirrored from www.zi-han.net/theme/hplus/table_data_tables.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:20:01 GMT -->
<!-- 强行抑制js的报错 -->
<script type="text/javascript">
function SlyarErrors() {
return true;
}
window.onerror = SlyarErrors;
</script>
<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>CL---品牌分类列表</title>
    <meta name="keywords" content="H+后台主题,后台bootstrap框架,会员中心主题,后台HTML,响应式后台">
    <meta name="description" content="H+是一个完全响应式，基于Bootstrap3最新版本开发的扁平化主题，她采用了主流的左右两栏式布局，使用了Html5+CSS3等现代技术">

    <link rel="shortcut icon" href="favicon.ico"> <link href="__PUBLIC__/admin/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
    <link href="__PUBLIC__/admin/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">

    <!-- Data Tables -->
    <link href="__PUBLIC__/admin/css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">

    <link href="__PUBLIC__/admin/css/animate.min.css" rel="stylesheet">
    <link href="__PUBLIC__/admin/css/style.min862f.css?v=4.1.0" rel="stylesheet">
    <link href="__PUBLIC__/admin/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">

</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>商品 <small>品牌分类列表，查找</small></h5>
                        <div class="ibox-tools">
                            <a class="collapse-link">
                                <i class="fa fa-chevron-up"></i>
                            </a>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <div>
                            <a href="Brand_Cat_add" class="btn btn-primary ">添加品牌分类</a>
                        </div>
                        <table class="table table-striped table-bordered table-hover dataTables-example">
                            <thead>
                                <tr>
                                    <th>品牌ID</th>
                                    <th>图标</th>
                                    <th>分类名</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                                <foreach name="data" item="val">
                                    <tr class="gradeX">
                                        <td class="center">{$val['id']}</td>
                                        <td class="center"><i class="{$val['icon']}"></i></td>
                                        <td class="center">{$val['level']}</td>
                                        <td>
                                            <a href="{:U('Shop/Brand_edit')}?id={$val['id']}"><button class="btn btn-info " type="button"><i class="glyphicon glyphicon-pencil"></i> 编辑</button></a>
                                            <a href="javascript:;" data-del="{$val['id']}" class="del"><button class="btn btn-info " type="button"><i class="glyphicon glyphicon-trash"></i> 删除</button></a>
                                        </td>
                                    </tr>
                                </foreach>
                            </tbody>
                            <tfoot>
                                <tr>
                                    <th>品牌ID</th>
                                    <th>图标</th>
                                    <th>分类名</th>
                                    <th>操作</th>
                                </tr>
                            </tfoot>
                        </table>

                    </div>
                </div>
            </div>
        </div>
    </div>
    <script src="__PUBLIC__/admin/js/jquery.min.js?v=2.1.4"></script>
    <script src="__PUBLIC__/admin/js/bootstrap.min.js?v=3.3.6"></script>
    <script src="__PUBLIC__/admin/js/plugins/jeditable/jquery.jeditable.js"></script>
    <script src="__PUBLIC__/admin/js/plugins/dataTables/jquery.dataTables.js"></script>
    <script src="__PUBLIC__/admin/js/plugins/dataTables/dataTables.bootstrap.js"></script>
    <script src="__PUBLIC__/admin/js/content.min.js?v=1.0.0"></script>
    <script src="__PUBLIC__/admin/js/plugins/sweetalert/sweetalert.min.js"></script>
    <script>
        $(".del").click(function() {
            var id = $(this).attr('data-del');
            var list_tr = $(this);
            
            swal({
                  title: "您确定要删除这条信息吗",
                  text: "删除后将无法恢复，请谨慎操作！",
                  type: "warning",
                  showCancelButton: true,
                  confirmButtonColor: "#1647a1",
                  confirmButtonText: "确定",
                  cancelButtonText: "取消",
                  closeOnConfirm: false,
                  closeOnCancel: false
            }, function(isConfirm) {
                if (isConfirm) {
                    $.ajax({
                        type:"post",
                        url:"{:U('Shop/Brand_del')}",
                        data:'id='+id,
                        dataType: "json",
                        success : function(data){
                            if (data.res==200) {
                                list_tr.parent('td').parent('tr').remove()
                                swal("删除成功！", "您已经永久删除了这条信息。", "success")
                            }else {
                                swal("删除失败！", data.msg+data.res, "error")
                            }
                        }
                    });
                } else {
                    swal("已取消", "您取消了删除操作！", "error")
                }
            })
        });

       $(document).ready(function(){$("#loading-example-btn").click(function(){btn=$(this);simpleLoad(btn,true);simpleLoad(btn,false)})});function simpleLoad(btn,state){if(state){btn.children().addClass("fa-spin");btn.contents().last().replaceWith(" Loading")}else{setTimeout(function(){btn.children().removeClass("fa-spin");btn.contents().last().replaceWith(" Refresh")},2000)}};
       $('#loading-example-btn').click(function(){
        location.reload();
       })
    </script>
    <script>
        $(document).ready(function(){$(".dataTables-example").dataTable();var oTable=$("#editable").dataTable();oTable.$("td").editable("http://www.zi-han.net/theme/example_ajax.php",{"callback":function(sValue,y){var aPos=oTable.fnGetPosition(this);oTable.fnUpdate(sValue,aPos[0],aPos[1])},"submitdata":function(value,settings){return{"row_id":this.parentNode.getAttribute("id"),"column":oTable.fnGetPosition(this)[2]}},"width":"90%","height":"100%"})});function fnClickAddRow(){$("#editable").dataTable().fnAddData(["Custom row","New row","New row","New row","New row"])};
    </script>

</body>


<!-- Mirrored from www.zi-han.net/theme/hplus/table_data_tables.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:20:02 GMT -->
</html>
